New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add authentication to RTSP server #6
Comments
After writing the Image to the SD Card and setting up the scripts the RTSP server should run on EDIT: @mh2370 could you please keep your original message in your Post? If you got another Question just add it to your post and do not remove the old content. Thanks |
FYI if you have a working SDK and can build stuff, then this modified RTSP server adds authentication support (but is untested): https://gist.github.com/roger-/103f4c50ed63a660f26f63171b45b010 |
This would be a great addition so we can monitor remotely with an authentication connection. |
@samtap Any news on that? |
I'm looking into this rtsp server which has builtin authentication but needs work to use with snx sdk: https://github.com/mpromonet/v4l2rtspserver I've been very busy with other stuff recently so no progress on the xiaofang camera. I rushed the image to hopefully attract others to develop stuff but so far no volunteers ;-) |
I tested the code from roger (above) and authentication seems to work. |
Awesome! I could never get the SDK to work properly so I never even got it to compile. Could you share a binary? |
build env: |
what's the password to the dev account in the above ova? |
I don't know for this ova, but a different one that was shared on discord had the password devel. |
thanks DavidRayner. i ended up booting to single-user and changing the password. The ova is very useful.
i signed up for discord. how do i join the discussion on discord?
|
There's an invite link at the bottom of the readme. Have you been able to build and test roger's code? |
Can someone point me in the right direction how to get this started? |
Okay, so I managed to compile rogers modified RTSP server on the sdk enviroment. It compiled flawlessly. Problem is if I replace the RTSP server on the sd card with the modified one and restart the service. Authentication works but i only get a blank screen. Any hints ? |
blockquote, div.yahoo_quoted { margin-left: 0 !important; border-left:1px #715FFA solid !important; padding-left:1ex !important; background-color:white !important; } Which device file under /dev are you pointing the binary to and trying to read the stream off of ?
Sent from Yahoo Mail for iPhone
On Thursday, May 18, 2017, 4:40 PM, a-zimmerer <notifications@github.com> wrote:
Okay, so I managed to compile rogers modified RTSP server on the sdk enviroment. It compiled flawlessly. Problem is if I replace the RTSP server on the sd card with the modified one and restart the service. Authentication works but i only get a blank screen. Any hints ?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.
|
Not sure what you mean by "Which device file under /dev are you pointing the binary to" ? I am reading the stream with VLC rtsp://IP I created a md5 checksum of my compiled modified snx_rtsp_server executable: |
w00t w00t ... sooo finally my RTSP-Stream is password protected. I got this mother f*** c*** working ! You have to start the modified snx_rtsp_server with following command: |
Hi I understand that in order to compile the RTSP server I need to get the snx sdk from somewhere? Where could I get it? I'd like to password protect my stream also. I'm trying to compile the server but I get this message: Is this because I don't have the snx sdk? |
Thanks a bunch! |
Hey @a-zimmerer Can you give any insight in how you set up the snx sdk for compiling the custom camera code? |
For SDK 1.60 vanilla build of rtsp_server cd /usr/src/sn986; ./sdk.unpack PATH=/usr/src/sn986/snx_sdk/toolchain/crosstool-4.5.2/bin:${PATH} cd /usr/src/sn986/snx_sdk/app/example/src/ipc_func/rtsp_server; |
Thanks man! |
Problem is H.264 Stream ain't working with roger's code. Does anybody know how to get it running? |
What version of the SDK are you using? |
@snflke @DavidRayner How to use snx_rtsp_server.zip to get authentication going? I assume the below file supports audio? |
Audio works perfectly for me with that one yes. I think the camera must be run at 720p but you can choose the bitrate. To use authentication extract the zip file to get the snx_rtsp_server binary (which has no file extension). Copy this onto the camera replacing the usual binary located at /media/mmcblk0p2/data/usr/bin/snx_rtsp_server. Ensure new binary has 777 permissions once on the camera. Then modify the text file on the camera located at /media/mmcblk0p2/data/etc/scripts/20-rtsp-server so that it has a line similar to this Jump on discord and ask for help if you need more detailed help. |
@DavidRayner Thank you so much.. It worked awesome..Do you know the default bitrate, width and height? Do you prefer RTSP over TCP or UDP? |
@newsera Width and height is locked to 1280x720 with this server. I think the default bitrate is 1024kbps. I prefer TCP because I'm doing motion detection on the other end, and UDP wouldn't be good for that :P |
👍 Perfect :) Works good.. I think I will buy more cameras lol.. Have been waiting for authentication for a long time now.. |
My camera is much slower after using the snx_rtsp_server binary with authentication and sometimes reboots itself. Anyone experiencing the same issue? Sometimes it doesn't even start the RTSP stream. |
Hi, and thanks to all, with this post and fang hack i make work the Xiaomifang 1080 :) When i see the rtsp is not protected in VLC i searched and see this post and modified the rtsp-server.pid But i make an error, i put -u media/stream1 copied from here but i see "not's a good idea" because i have all default directories and now after put user and pass doen't work rtsp strem. Anyone can help for make the correct default directori or create working media/stream1? Thanks for all and your work. |
Maybe use rtsp://myuser:mypass@"deviceip":554/unicast doesn't the correct form after put pass? I tryed a lot of combinations and nothing :( |
You don't need to worry about the media/* directories on the camera, the camera will handle them itself. Inside my 20-rtsp-server file I have: snx_rtsp_server -Q 10 -u media/stream1 -P 554 -A my_user:my_pass -a >$LOG 2>&1 & For use with VLC I open the following stream: rtsp://my_user:my_pass@my_ip:554/media/stream1 Are you able to access the camera from the same local network? |
Yes, i log in with same local network (i use one laptop conected at same wifi without firewalls or rules, and port 554 works because without modify the snxserver all work without pass) but in the moment i set the snx_rtsp_server line i can't connect to rtsp with vlc. I go to see another time the 20-rstp.... file for see if i used caps or not in -P. |
Finally works, i erased -W1980 -H1080 (i don't remeber the exact but the image quality in this line i erased and works now!). Tnx with your exact line of 20-rts... works fine. |
@DavidRayner thanks for the info, it works fine, but I have a problem with TinyCam. Before the mod I could connect and see the stream even on the WAN, now I can't. Do you know how to configure tinycam or similar program on an android device? I already tried vlc for android but it get stuck. Thank you |
Hi, I it very good !!! thanks for this info !! :) I also have problems with tinycam, it works well but the flow stops after a while, works in WAN and LAN with dyndns and ports redirected in NAT in my box. I think I would have to lower the quality of the rtsp stream. Is this possible with your server? Regards :) |
Ardefy can you share some screenshots of your tinycam configuration?
Il 14 set 2017 4:51 PM, "ardefy" <notifications@github.com> ha scritto:
… Hi, I it very good !!! thanks for this info !! :)
I also have problems with tinycam, it works well but the flow stops after
a while, works in WAN and LAN with dyndns and ports redirected in NAT in my
box. I think I would have to lower the quality of the rtsp stream. Is this
possible with your server?
Regards :)
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#6 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AJcCVWIjwNcUe3agT6b_H5NUPUL360z7ks5siT1xgaJpZM4Lk-J3>
.
|
But the stream stop regularly :-( |
do you have a stable and strong upload speed from the network the camera is on? |
In local lan it s ok. Not in wan :( |
Ok, I tried and I have the same issue
Il 14 set 2017 5:17 PM, "ardefy" <notifications@github.com> ha scritto:
… In local lan it s ok. Not in wan :(
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#6 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AJcCVSqNVL7Q1AmR8caKf87HJs7HhNWeks5siUNpgaJpZM4Lk-J3>
.
|
Hey Guys, I do not believe this is a FangHacks issue, I have this happen all the time with TinyCam and other streaming sources, It seems to only display when there is activity? Cheers Rob. |
Hi, After some digging a notice the authentication is supported by this issue hasn´t been closed.. any reason? or am I missing something? I thought the -U user:password database was for that purpose... or is it still not integrated for this Hack? Another thing I notice is that when the v4l2rtspserver support this authentification method, live555 doesn't support encryption of the streaming. I will give try to include it using the cisco/libsrtp By the way, do anyone know what Xiaomi client sends? Format? it might be easier to take that streaming and the controls to another server.... |
I'm not sure if encrypted rtsp streams / srtp are supported well by clients. Authentication is supported in my new rtsp server (not released yet). By the way, for simple encryption you could use stunnel, which works quite well. The downside is you also need it on the client, but maybe apps like tinycam could support it and make it less of a hassle. |
@samtap is v4l2rtspserver project your as well? I got confused with the fork. or you mean the compilation of v4l2rtspserver for this hack? I am trying to do the same for the Mijia 1080p. Filipowicz251/mijia-1080P-hacks#5 |
No it's not my project but I'm using both https://github.com/mpromonet/v4l2rtspserver and https://github.com/haoweilo/RTSP_stream_server for my new rtsp server. |
Can I ask what are you missing of those project to create a new one? just curious I might be interested to participate (if possible). Actually I saw yesterday RSTP_stream_server is from v4lsrspserver.... |
The drivers of XiaoFang don't allow sharing the hardware, so I want to add features like recording, snapshots, on a reasonably good code-base that already has rtsp features like auth. Tried to use pure v4l2rtspserver, abstracting all hardware access through v4l2wrapper, but gave up on that. So now I'm back to a more pragmatic approach (more hacking). |
@samtap Thanks, I will join and see what I can do.... |
Can you add rstp authentication?
Thx
The text was updated successfully, but these errors were encountered: